fix(text): route external raster kinds around the Worker font-bake plan - #73
fix(text): route external raster kinds around the Worker font-bake plan#73thejustinwalsh wants to merge 4 commits into
Conversation
size-limit report 📦
|
The runtime shoveled every requested raster into the Worker font-bake plan, and the Worker's embedded baker switch correctly rejected kinds it does not carry — killing the whole load even though the host-side path through technique.runtimeBaker exists for exactly this case. The routing authority is now one declared set, workerRasterKinds, exported from the runtime-bake subpath: Worker plans carry only Worker-embedded kinds, and every other technique's raster deliberately misses in the baked artifact and bakes host-side through the baker its own declaration names. Proven red-green in Node against the published example package with a strict stub enforcing the Worker contract, and by the restored browser lane: deterministic external raster frames on WebGPU and WebGL2. Verified pre-existing on a clean origin/main worktree before fixing.
6d2d88f to
0d93370
Compare
…re-subpath ceilings The routing change grew the renderer-neutral core bundle by +1,786 raw / +919 minified bytes, but the generated size evidence was not refolded, so the growth first surfaced in the CI runtime gate's fresh build: 228,199 raw / 155,956 minified against the 227,000 / 155,500 ceilings, byte- identical across linux-x64 and darwin. Re-price the two exceeded ceilings to the measured actuals with the usual tight headroom; gzip and Brotli still fit under their prior ceilings. The evidence refold itself rides the measure-entry branch (841ff05).
…ings The external-raster routing bundles into the Three adapter as well as the core subpath, so the same unrecorded growth surfaced there once the gate progressed past the re-priced core entry: 370,521 raw / 241,995 minified against the 370,000 / 241,500 ceilings (+1,786 raw / +914 minified over the last recorded evidence). Gzip and Brotli still fit. Same shape as the core re-price one commit down; the evidence refold rides feat/measure-entry.
| * the realization of this set; its rejection of anything else guards protocol | ||
| * violations, not routing. | ||
| */ | ||
| export const workerRasterKinds: readonly string[] = Object.freeze(['bitmap', 'msdf', 'slug']); |
There was a problem hiding this comment.
Incomplete. Holding two versions of baking routing still.
# Conflicts: # docs/packages/benchmarks.md # docs/packages/glyph-example-raster.md # docs/packages/glyph.md
|
Merged to The work is on Squash merging rewrote the commits, so the head SHA never became an ancestor of Closing rather than rebasing, so the already-merged work is not reintroduced and re-resolved. Closed, not merged, is a GitHub bookkeeping artifact here, not a statement about the code. |
What
Repairs the third-party runtime-bake route — the
benchmark:external-rasterproof lane was failing on main (verified pre-existing in a cleanorigin/mainworktree before fixing; not a stack regression).Mechanism
The runtime shoveled every requested raster into the Worker font-bake plan, and the Worker's embedded baker switch (bitmap | msdf | slug) correctly rejected kinds it doesn't carry — which killed the whole load, even though the host-side path through
technique.runtimeBakerexists for exactly this case and every technique (including the published example) already declares its baker.Fix
One declared routing authority:
workerRasterKinds, exported from@pmndrs/text/runtime-bake. Worker plans carry only Worker-embedded kinds; every other technique's raster deliberately misses in the baked artifact and bakes host-side through the baker its own declaration names. The Worker's switch remains as the realization of the set — its rejection now guards protocol violations, not routing.Evidence
['bitmap'], and the external raster decodes from its host-baked, provenance-checked artifact.external-raster-proof-readyon WebGPU and WebGL2 with identical deterministic frame hashes (817495c4…), 2/2 frames each.